<template>
    <div>
        <van-nav-bar title="视频" left-text="返回" left-arrow @click-left="$router.back()" />
        <video width="750" height="540" controls>
            <source src="../../assets/shopimg/git.mp4" type="video/mp4">
        </video>
        <main>
            <div>
                <van-tabs v-model:active="active">
                    <van-tab title="直播介绍">

                    </van-tab>
                    <van-tab title="互动评论">
                        <input type="text" placeholder="说点什么~">
                    </van-tab>

                </van-tabs>
            </div>
        </main>
    </div>
</template>
<script lang="ts" setup>
// import route from '@/router';
import { ref } from 'vue'
import axios from 'axios';
import { useRoute } from 'vue-router';


const active = ref(0);
const route = useRoute()
const getbroadcast = ref([])
console.log(route.query.id)

const getLive = async (id: any) => {
    await axios.get(`/api/live?id=${id}`)
        .then(res => {
            console.log(res.data);
            getbroadcast.value = res.data.video
        })

}
getLive(route.query.id)
</script>